<?php

namespace Viettrans\FrontBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * Viettrans\FrontBundle\Entity\Category
 *
 * @ORM\Table(name="category")
 * @ORM\Entity(repositoryClass="Viettrans\FrontBundle\Entity\CategoryRepository")
 */
class Category
{
/*******************************************************************************
* Begin of user's definitions
*******************************************************************************/
    /**
    * @ORM\OneToMany(targetEntity="Announcement", mappedBy="category")
    */
    protected $announcements;


/*******************************************************************************
* End of user's definitions
*******************************************************************************/  
    
    /**
     * @var integer $id
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @var integer $parentId
     *
     * @ORM\Column(name="parentId", type="integer")
     */
    private $parentId;

    /**
     * @var string $name
     *
     * @ORM\Column(name="name", type="string", length=255)
     */
    private $name;


    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set parentId
     *
     * @param integer $parentId
     */
    public function setParentId($parentId)
    {
        $this->parentId = $parentId;
    }

    /**
     * Get parentId
     *
     * @return integer 
     */
    public function getParentId()
    {
        return $this->parentId;
    }

    /**
     * Set name
     *
     * @param string $name
     */
    public function setName($name)
    {
        $this->name = $name;
    }

    /**
     * Get name
     *
     * @return string 
     */
    public function getName()
    {
        return $this->name;
    }
}